e0ec5df6b46ebaecc8807016cd0b84db05da57dc,source/org/jasig/portal/channels/UserPreferences/TabColumnPrefsState.java,TabColumnPrefsState,moveColumn,#String#String#String#,218
Before Change
sourceColumn = doc.createElement("folder");
sourceColumn.setAttribute("name", "");
sourceColumn.setAttribute("ID", String.valueOf(GenericPortalBean.getUserLayoutStore().getNextStructFolderId(staticData.getPerson().getID())));
sourceColumn.setAttribute("type", "regular");
sourceColumn.setAttribute("hidden", "false");
sourceColumn.setAttribute("unremovable", "false");
sourceColumn.setAttribute("immutable", "false");
NodeList channels = source.getElementsByTagName("channel");
int numChannels = channels.getLength();
for (int nodeIndex = 0; nodeIndex < numChannels; nodeIndex++)
{
Node channel = channels.item(0); // The index is 0 because after each move, the channel positions move up a notch
boolean moveSuccessful = context.getUserLayoutManager().moveNode(channel, sourceColumn, null);
// Need to deal with case when move isn't successful!!!
}
source.appendChild(sourceColumn);
}
// Check if destination is a tab (its parent is the layout element)
After Change
// and use this new column as the source
if (isTab(source))
{
sourceColumn = createFolder("");
NodeList channels = source.getElementsByTagName("channel");
int numChannels = channels.getLength();
for (int nodeIndex = 0; nodeIndex < numChannels; nodeIndex++)
{
Node channel = channels.item(0); // The index is 0 because after each move, the channel positions move up a notch
boolean moveSuccessful = context.getUserLayoutManager().moveNode(channel, sourceColumn, null);
// Not done yet: Need to deal with case when move isn't successful!!!
}
source.appendChild(sourceColumn);
}
// If destination is a tab, create a column, move the tab's children channels to this column,